#include <stdio.h>

class A {
public:
    void B() {
        delete this;
    }
};

int main()
{
    A *a = new A();
    a->B();
    a->B();
    return 0;
}
